package com.coscon.model.auth;

import lombok.Getter;
import lombok.Setter;

import java.util.Arrays;

/**
* @ClassName: AuthMenuRule 
* @Description: TODO(权限菜单规则) 
* @author 409390047@qq.com 
* @date 2018年6月7日 下午1:04:00
 */
public class AuthMenuRule implements  java.io.Serializable{

	private static final long serialVersionUID = -4315938784739245098L;


	private String action;//资源的URL
	private Integer[] roleIds;//可访问的角色ID
	
	
	public AuthMenuRule(){
		
	}
	
	public AuthMenuRule(String action){
		this.action = action;
	}
	
	public AuthMenuRule(String action,Integer[] roleIds){
		this.action = action;
		this.roleIds = (Integer[])roleIds.clone();
	}



	public String getAction() {
		return action;
	}

	public void setAction(String action) {
		this.action = action;
	}

	public Integer[] getRoleIds() {
		return (Integer[]) roleIds.clone();
	}

	public void setRoleIds(Integer[] roleIds) {
		this.roleIds = (Integer[]) roleIds.clone();
	}

	
	@Override
	public String toString() {
		return "AuthMenuRule [action=" + action + ", roleIds=" + Arrays.toString(roleIds) + "]";
	}
	


	

}
